﻿using OpenQA.Selenium;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AngleExpress.web
{
    class EdgeWebOpener : WebOpener
    {
        public EdgeWebOpener():base("Microsoft WebDriver")
        {

        }
        protected override IWebDriver initDriver()
        {
            string driverPath = System.AppDomain.CurrentDomain.BaseDirectory;
            OpenQA.Selenium.Edge.EdgeDriverService driverService = OpenQA.Selenium.Edge.EdgeDriverService.CreateDefaultService(driverPath, "msedgedriver.exe");
            driverService.HideCommandPromptWindow = true;
            OpenQA.Selenium.Edge.EdgeOptions options = new OpenQA.Selenium.Edge.EdgeOptions();
            return new OpenQA.Selenium.Edge.EdgeDriver(driverService, options);
        }

    }
}
